package cn.darkhorse.device.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 备件信息表
 * </p>
 *
 * @author maoguanjun
 * @since 2022-11-11
 */
@Getter
@Setter
  @TableName("mes_spare_parts")
@ApiModel(value = "MesSpareParts对象", description = "备件信息表")
public class MesSpareParts implements Serializable {

    private static final long serialVersionUID = 1L;

      @ApiModelProperty("主键")
        @TableId(value = "id", type = IdType.AUTO)
      private Long id;

      @ApiModelProperty("备件编号")
      @NotBlank(message = "编号不能为空")
      private String code;

      @ApiModelProperty("备件名称")
      @NotBlank(message = "备件名称不能为空")
      private String name;

      @ApiModelProperty("备件类型")
      @Digits(integer = 10, fraction = 0,message = "备件类型超出范围")
      @NotNull(message = "备件类型不能为空")
      private Long type;

      @ApiModelProperty("规格")
      @NotBlank(message = "规格不能为空")
      private String model;

      @ApiModelProperty("计量单位")
      private String unit;

      @ApiModelProperty("备件厂商")
      @NotBlank(message = "备件厂商不能为空")
      private String maker;

      @ApiModelProperty("说明")
      @Size(min = 0, max = 300, message = "说明长度不能超过300个字符")
      private String introduce;

      @ApiModelProperty("安全库存量")
      private BigDecimal forewarnInventory;

      @ApiModelProperty("库存量")
      private BigDecimal inventory;

      @ApiModelProperty("预警通知人")
      private String alertNotifier;

      @ApiModelProperty("制单人")
      private Long creator;

      @ApiModelProperty("制单部门")
      private Long creatorDept;

      @ApiModelProperty("创建时间")
      private LocalDateTime gmtCreate;

      @ApiModelProperty("修改时间")
      private LocalDateTime gmtModify;

      @ApiModelProperty(" 制单日期")
      private LocalDateTime creatorDate;


}
